package com.oil.petro.eshop.bean;

import com.oil.petro.eshop.entity.Account;
import com.oil.petro.eshop.entity.Person;
import javax.persistence.Column;
import javax.validation.constraints.Size;
import org.hibernate.validator.constraints.NotEmpty;

public class UserBean extends BasicBean {

    @NotEmpty(message = "Pole nie może być puste")
    @Size(max = 100, message = "Za długa nazwa, maksymalnie {1} znaków")
    private String firstName = "";
    @NotEmpty(message = "Pole nie może być puste")
    @Size(max = 100, message = "Za długa nazwa, maksymalnie {1} znaków")
    private String lastName = "";
    @NotEmpty(message = "Pole nie może być puste")
    @Size(max = 6, message = "Za długa nazwa, maksymalnie {1} znaków")
    private String postCode = "";
    @NotEmpty(message = "Pole nie może być puste")
    @Size(max = 255, message = "Za długa nazwa, maksymalnie {1} znaków")
    private String address = "";
    @NotEmpty(message = "Pole nie może być puste")
    @Size(max = 100, message = "Za długa nazwa, maksymalnie {1} znaków")
    private String city = "";
    @NotEmpty(message = "Pole nie może być puste")
    @Size(max = 100, message = "Za długa nazwa, maksymalnie {1} znaków")
   private  String login = "";
    private String password = "";
    private String repassword = "";
    @NotEmpty(message = "Pole nie może być puste")
    @Size(max = 100, message = "Za długa nazwa, maksymalnie {1} znaków")
    private String email = "";
    private String comment="";
    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getPostCode() {
        return postCode;
    }

    public void setPostCode(String postCode) {
        this.postCode = postCode;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getRepassword() {
        return repassword;
    }

    public void setRepassword(String repassword) {
        this.repassword = repassword;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public UserBean(Person person) {
        this.firstName = person.getFirstName();
        this.lastName = person.getLastName();
        this.postCode = person.getPostCode();
        this.address = person.getAddress();
        this.city = person.getCity();
    }

    public UserBean() {
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

  

    
}
